<?php
namespace AuctionCore\AuctionOpenApi;
/**
* 回传系统各接口 测试类
* @author       Eric Lee
*/
class PartnerApiTest extends \PHPUnit_Framework_TestCase {

	public static  function testApi(){?>
        <meta charset='utf-8' xmlns="http://www.w3.org/1999/html">
            <h1>接口测试</h1>
            <hr>

            <b>1,车源线索上传接口</b>
            <form action="http://liguohua.openapi.lpaiche.com/Partner/upload_owner" method="post" target="_blank">
                <br>合作商代码:<input name="code" value="che300" />
                <br>令牌:<input name="token" size="100" value="<?=sha1('94263bab4bcb1b'.'che300'.time())?>" />
                <br>当前时间:<input name="time" value="<?=time()?>" />
                <br>品牌:<input name="brand" value="" />
                <br>车系:<input name="series" value="" />
                <br>车型:<input name="model" value="" />
                <br>表显里程:<input name="mileage" value="<?=rand(1,6)?>" />
                <br>车辆所在地:<input name="location_area" value="北京" />
                <br>上牌时间:<input name="licensed_date" value="<?=date('Y-m-d H:i:s',strtotime('-1 year'))?>" />
                <br>车主姓名:<input name="owner_name" value="" />
                <br>车主电话:<input name="owner_phone" value="1<?=rand(0,9)?><?=rand(0,9)?><?=rand(0,9)?><?=rand(0,9)?><?=rand(0,9)?><?=rand(0,9)?><?=rand(0,9)?><?=rand(0,9)?><?=rand(0,9)?><?=rand(0,9)?>" />
                <br>车主性别:<input name="owner_gender" value="<?=rand(1,2)?>" />
                <br>车主备注:<textarea name="owner_remark">owner_remark<?=time()?></textarea>
                <input type="submit" name="submit" value="submit" />
            </form>
            <hr>
            <b>2,车源状态查询接口</b>
            <form action="http://liguohua.openapi.lpaiche.com/Partner/get_car" method="post" target="_blank"  >
                <br>合作商代码:<input name="code" value="che300" />
                <br>令牌:<input name="token" size="100" value="<?=sha1('94263bab4bcb1b'.'che300'.time())?>" />
                <br>当前时间:<input name="time" value="<?=time()?>" />
                <br>车辆编码:<input name="car_no" value="1C1" />
                <input type="submit" name="submit" value="submit" />
            </form>

            <hr>
            <b>3,较兑时间接口</b>
            <form action="http://liguohua.openapi.lpaiche.com/Partner/get_time" method="get" target="_blank"  >
                <input type="submit" name="submit" value="submit" />
            </form>

    <?php
    }
}